#include <mainController.h>

#include <gtk/gtk.h>
#include <goocanvas.h>

#include <mainController.h>
#include <viewConf.h>
#include <modelConf.h>

bool CheckRootUser()
{
  struct passwd *pwd;
  pwd = getpwuid(getuid());
  std::string userName(pwd->pw_name);
  if("root" == userName)
    return true;
  else{
    std::cout<<"You must be root user !\n";
    return false;
  }
}

int main(int argc,char* argv[])
{
  if(!CheckRootUser())
    return -1;

  gtk_init(&argc,&argv);

  Model::ModelConf *MConf;
  MConf = Model::ModelConf::GetModelConf();
  View::ViewConf *VConf;
  VConf = View::ViewConf::GetViewConf();

  using namespace Controller;  
  MainController *controller = new MainController();
  controller->Run();

  gtk_main();
  return 0;
}
